package br.com.ffm.si.sysbolaodacopade2014.testeUnidade;

import static org.junit.Assert.*;

import java.security.Timestamp;
import java.util.List;

import org.junit.Test;

import br.com.ffm.si.sysbolaodacopade2014.fachada.Fachada;
import br.com.ffm.si.sysbolaodacopade2014.interfaces.IFachada;
import br.com.ffm.si.sysbolaodacopade2014.model.Apostador;
import br.com.ffm.si.sysbolaodacopade2014.model.Time;

public class TimeTeste {
	
	
	List<Time> times = fachada.listarTimes();
	private static IFachada fachada = new Fachada();

	@Test
	public void testSalvarTime() {
		assertEquals(0, times.size());
		assertEquals(0, fachada.listarTimes().size());

		Time a = new Time ();

		a.setId("1");
		a.setBandeira("bandeirajpg");
		a.setNome("testeTime");
		

		fachada.salvarTime(a);
		
		assertEquals(1, times.size());
		assertEquals(1, fachada.listarTimes().size());
		
		Time b = new Time ();

		a.setId("2");
		a.setBandeira("2bandeirajpg");
		a.setNome("2testeTime");
		
		fachada.salvarTime(b);
		
		assertEquals(2, times.size());
		assertEquals(2, fachada.listarTimes().size());
		
	}
	
	@Test
	public void testeRemoverTime() {
		
		assertEquals(0, times.size());
		assertEquals(0, fachada.listarTimes().size());
		
		
		
		Time a = new Time ();

		a.setId("1");
		a.setBandeira("bandeirajpg");
		a.setNome("testeTime");
		

		
	}

}
